// 手机号前三后四显示处理
function getPhone(val) {
	let str = val + ''
	let arr1 = str.split('')
	let arr2 = []
	for (let i = 0; i < arr1.length; i++) {
		if (i < 3 || i > arr1.length - 5) {
			arr2.push(arr1[i])
		} else {
			arr2.push('*')
		}
	}
	let str1 = arr2.join('')
	return str1
}

function licencePlate(val) {
	let str = val + ''
	let arr1 = str.split('')
	let arr2 = []
	for (let i = 0; i < arr1.length; i++) {
		if (i < 2 || i > arr1.length - 3) {
			arr2.push(arr1[i])
		} else {
			arr2.push('*')
		}
	}
	let str1 = arr2.join('')
	return str1
}

function timeMonthDay(val) {
	let da = ''
	if (val) {
		let month = val.slice(5, 7)
		let day = val.slice(8, 10)
		let time = val.slice(11, 16)
		da = `${month-0}月${day-0}日 ${time}`
	}

	return da
}
export default {
	getPhone,
	licencePlate,
	timeMonthDay
}
